package br.com.fidalgotecnologia.layar.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.Type;

@Entity
@Table(schema="poi", name="icon")
@SequenceGenerator(sequenceName="poi.icon_id_seq" , name="icon_seq")
public class Icon implements Serializable{
	private Long id;
	private byte[] arquivo;
	private int type;
	
	
	
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="icon_seq")
	@Column(name="id")
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	@Type(type="org.hibernate.type.BinaryType")
	@Column(name="arquivo", columnDefinition = "bytea")
	public byte[] getArquivo() {
		return arquivo;
	}
	public void setArquivo(byte[] arquivo) {
		this.arquivo = arquivo;
	}
	
	
	@Column(name="type")
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	
}
